package com.zc.custom.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.zc.custom.domain.ChargeOtherOrderInfo;
import com.zc.custom.mapper.ChargeOtherOrderInfoMapper;
import com.zc.custom.service.IChargeOtherOrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 第三方充电订单信息Service业务层处理
 *
 * @author ruoyi
 * @date 2024-05-30
 */
@Service
public class ChargeOtherOrderInfoServiceImpl implements IChargeOtherOrderInfoService
{
    @Autowired
    private ChargeOtherOrderInfoMapper chargeOtherOrderInfoMapper;

    /**
     * 查询第三方充电订单信息
     *
     * @param id 第三方充电订单信息主键
     * @return 第三方充电订单信息
     */
    @Override
    public ChargeOtherOrderInfo selectChargeOtherOrderInfoById(Long id)
    {
        return chargeOtherOrderInfoMapper.selectChargeOtherOrderInfoById(id);
    }

    /**
     * 查询第三方充电订单信息列表
     *
     * @param chargeOtherOrderInfo 第三方充电订单信息
     * @return 第三方充电订单信息
     */
    @Override
    public List<ChargeOtherOrderInfo> selectChargeOtherOrderInfoList(ChargeOtherOrderInfo chargeOtherOrderInfo)
    {
        return chargeOtherOrderInfoMapper.selectChargeOtherOrderInfoList(chargeOtherOrderInfo);
    }

    /**
     * 新增第三方充电订单信息
     *
     * @param chargeOtherOrderInfo 第三方充电订单信息
     * @return 结果
     */
    @Override
    public boolean insertChargeOtherOrderInfo(ChargeOtherOrderInfo chargeOtherOrderInfo)
    {
        chargeOtherOrderInfo.setCreateTime(DateUtils.getNowDate());
        return chargeOtherOrderInfoMapper.insertChargeOtherOrderInfo(chargeOtherOrderInfo);
    }

    /**
     * 修改第三方充电订单信息
     *
     * @param chargeOtherOrderInfo 第三方充电订单信息
     * @return 结果
     */
    @Override
    public boolean updateChargeOtherOrderInfo(ChargeOtherOrderInfo chargeOtherOrderInfo)
    {
        return chargeOtherOrderInfoMapper.updateChargeOtherOrderInfo(chargeOtherOrderInfo);
    }

    /**
     * 批量删除第三方充电订单信息
     *
     * @param ids 需要删除的第三方充电订单信息主键
     * @return 结果
     */
    @Override
    public int deleteChargeOtherOrderInfoByIds(Long[] ids)
    {
        return chargeOtherOrderInfoMapper.deleteChargeOtherOrderInfoByIds(ids);
    }

    /**
     * 删除第三方充电订单信息信息
     *
     * @param id 第三方充电订单信息主键
     * @return 结果
     */
    @Override
    public int deleteChargeOtherOrderInfoById(Long id)
    {
        return chargeOtherOrderInfoMapper.deleteChargeOtherOrderInfoById(id);
    }
}
